﻿
@{
    Layout = "~/Views/Shared/_LayoutIM.cshtml";
}
<body class="login-bg">
    <section>
        <div class="login">
            <div class="language">
                <div class="language-box">
                    <span>切换语言</span>
                    <i>中文</i>
                </div>

                <div class="choose-lang">
                    <div class="choose-lang-box">
                        <div class="choose-lang-btn">
                            <i class="language-chn"></i>
                            <span>中文</span>
                        </div>

                        <div class="choose-lang-btn">
                            <i class="language-en"></i>
                            <span>English</span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="login-form">
                <form id="form">
                    <h1>会员登录</h1>

                    <div class="login-form-group">
                        <label class="icon-phone">手机/UID</label>

                        <div class="input-group">
                            <input placeholder="请输入手机号/UID" name="username">
                            <i class="clear-keyword"></i>
                        </div>
                    </div>

                    <div class="login-form-group">
                        <label class="icon-pw">登录密码</label>

                        <div class="input-group">
                            <input type="password" placeholder="请输入登录密码" name="password">
                            <i class="clear-keyword"></i>
                        </div>
                    </div>

                    <div class="login-form-group">
                        <label class="icon-code">验证码</label>

                        <div class="input-group form-code">
                            <input placeholder="请输入图中的字符" name="code">
                            <i class="clear-keyword"></i>
                            <img src="/Theme/images/ValidateImage.jpg">
                        </div>
                    </div>

                    <div class="login-submit">
                        <button type="button" id="Btn_Login">提交</button>
                    </div>

                    <div class="login-links">
                        <a href="/Home/Register" class="login-links-1">立即注册</a>
                        <a href="FindPW.html" class="login-links-2">忘记密码？</a>
                    </div>
                </form>

            </div>
        </div>
    </section>
    <script>
	$(function(){
		$('.language-box').click(function(){
			$('.choose-lang').fadeIn();
		});

		$('.choose-lang').click(function(){
			 $(this).fadeOut();
		});
     });

        $("#Btn_Login").click(function () {

            $.post("/Home/Login", $("#form").serialize(), function (data) {
                if (data.Status == 200)
                {
                    location.href = '/Home/ChatMain';
                }
                else
                {
                    alert(data.Message);
                }
            })
        })
    </script>
</body>
